<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>javascript build website</title>
<script src="http://www.m3958.com/yui/3.5.0pr2/build/yui/yui-min.js"></script>

<script type="text/javascript">

YUI().use('node',function(Y){
	var runBt = Y.one('#run-btn'),
		javascriptTa = Y.one('#javascript-ta'),
		htmlTa = Y.one('#html-ta'),
		htmlContainer = Y.one('#html-container'),
		c = Y.one('#ccontainer');
	runBt.on('click',function(e){
		htmlContainer.setContent(htmlTa.get('value'));
		Y.later(1000,Y,function(){
			eval(javascriptTa.get('value'));
		});
		
	});
});

</script>
</head>
<body>
<div id="html-container"></div>

<textarea rows="10" cols="100" id="html-ta"></textarea>
<br/>
<textarea rows="10" cols="100" id="javascript-ta"></textarea>
<br/>

<button type="button" id="run-btn">RUN</button>
</body>
</html>